import web
import res_code
from controllers import login, posts

urls = (
'/', 'controllers.login.Login',
'/register/(.+)/(.+)/(.+)', 'controllers.register.Register',
'/index', 'controllers.posts.Index',
'/view/(\d+)', 'controllers.posts.View',
'/new', 'controllers.posts.New',
'/delete/(\d+)', 'controllers.posts.Delete',
'/edit/(\d+)', 'controllers.posts.Edit',
'/search_app', 'controllers.search_app.SearchApp',
'/free_top/(\d+)', 'controllers.top.FreeTop',
)

app = web.application(urls, globals())

if __name__ == '__main__':
    app.run()